<template>
  <div>
    <el-button @click="btnClick">全屏</el-button>
  </div>
</template>
<script>
import screenfull from 'screenfull'
export default {
  methods: {
    btnClick() {
      if (screenfull.isEnabled) {
        screenfull.toggle()
      } else {
        this.$message.error('该浏览器不支持全屏')
      }
      //   console.log('screenfull', screenfull)
    }
  }
}
</script>
<style></style>
